<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" media="screen" href="../../css/bootstrap.min.css">
</head>
<body>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
	<form class="form-horizontal" onsubmit="return false" id="form">
		<fieldset>
			<div class='form-group'>
				<label class='col-md-2 control-label'>userid</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='userid' type='text' name='userid' id='userid' data-bv-notempty='true' data-bv-notempty-message='userid 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>implementid</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='implementid' type='text' name='implementid' id='implementid' data-bv-notempty='true' data-bv-notempty-message='implementid 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>orderid</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='orderid' type='text' name='orderid' id='orderid' data-bv-notempty='true' data-bv-notempty-message='orderid 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>paynumber</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='paynumber' type='text' name='paynumber' id='paynumber' data-bv-notempty='true' data-bv-notempty-message='paynumber 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>paymerchantnumber</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='paymerchantnumber' type='text' name='paymerchantnumber' id='paymerchantnumber' data-bv-notempty='true' data-bv-notempty-message='paymerchantnumber 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>refundnumber</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='refundnumber' type='text' name='refundnumber' id='refundnumber' data-bv-notempty='true' data-bv-notempty-message='refundnumber 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>refundreason</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='refundreason' type='text' name='refundreason' id='refundreason' data-bv-notempty='true' data-bv-notempty-message='refundreason 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>refundstate</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='refundstate' type='text' name='refundstate' id='refundstate' data-bv-notempty='true' data-bv-notempty-message='refundstate 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>money</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='money' type='text' name='money' id='money' data-bv-notempty='true' data-bv-notempty-message='money 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>actualamount</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='actualamount' type='text' name='actualamount' id='actualamount' data-bv-notempty='true' data-bv-notempty-message='actualamount 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>refundtime</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='refundtime' type='text' name='refundtime' id='refundtime' data-bv-notempty='true' data-bv-notempty-message='refundtime 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>confirmrefundtim</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='confirmrefundtim' type='text' name='confirmrefundtim' id='confirmrefundtim' data-bv-notempty='true' data-bv-notempty-message='confirmrefundtim 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>refundname</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='refundname' type='text' name='refundname' id='refundname' data-bv-notempty='true' data-bv-notempty-message='refundname 不能为空'>
				</div>
			</div>


			<div class="form-actions">
				<div class="row" align="center">
					<div class="col-md-12">
					    <button class="btn btn-primary" onclick="location.href='mfflRefundList.html'">返回</button>
						<button class="btn btn-primary" type="submit" onclick="add()">
							<i class="fa fa-save"></i> 保存
						</button>
					</div>
				</div>
			</div>

		</fieldset>
	</form>
</div>
	<script type="text/javascript" src="../../js/libs/jquery-2.1.1.min.js"></script>
	<script type="text/javascript" src="../../js/jq.js"></script>
	<script type="text/javascript" src="../../js/plugin/bootstrapvalidator/bootstrapValidator.min.js"></script>
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript" src="../../layui/layui.js"></script>
	<script type="text/javascript">
		layui.use(['layer','laydate'], function(){
		    var layer = layui.layer;
		});
		
		function add() {
			$('#form').bootstrapValidator();
			var bootstrapValidator = $("#form").data('bootstrapValidator');
			bootstrapValidator.validate();
		    if(!bootstrapValidator.isValid()){
			   return;
		    }
		    
		    var formdata = $("#form").serializeObject();

			$.ajax({
				type : 'post',
				url : '/mfflRefunds',
				contentType: "application/json; charset=utf-8",  
				data : JSON.stringify(formdata),
				success : function(data) {
					layer.msg("添加成功", {shift: -1, time: 1000}, function(){
                        location.href = "mfflRefundList.html";
                    });
				}
			});
		}
		
	</script>
</body>
</html>
